{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "1fccb1f8",
   "metadata": {},
   "source": [
    "### Linear Regression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "35ccce30",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "6c16f4df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7fa9f9b41e50>]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiIAAAGdCAYAAAAvwBgXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA1cUlEQVR4nO3de7jVY/7/8ecu2p13KpWm3UFjBuPQyaGEIhHjMMYhKh2IKKQhMr6UwXbsOxSRQ+WQahyKcRgRhaSDMoYZvmjslGSLvTto7dp7/f64f5qJSjt7rc86PB/X9bnGvVp7f96tay7r5X7fn/vOicfjcSRJkiJQJeoCJElS9jKISJKkyBhEJElSZAwikiQpMgYRSZIUGYOIJEmKjEFEkiRFxiAiSZIis0vUBWxPeXk5K1asoE6dOuTk5ERdjiRJ2gHxeJw1a9bQtGlTqlTZ/pxHSgeRFStWkJ+fH3UZkiRpJyxbtoxmzZpt9z0pHUTq1KkDhL9I3bp1I65GkiTtiJKSEvLz8zd/j29PSgeR79sxdevWNYhIkpRmdmRZhYtVJUlSZAwikiQpMgYRSZIUGYOIJEmKjEFEkiRFxiAiSZIiYxCRJEmRMYhIkqTIGEQkSVJkEhpExo0bxwEHHLB5Z9SOHTvywgsvJPKWkiQpjSQ0iDRr1oybb76ZhQsXsnDhQo466ihOPvlk3n///UTeVpIkpYmceDweT+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j4RHe6667Lt6kSZN4bm5u/Igjjoi/9957SasvJx6Px5MTeSRJkraUVWtEJElSajGISJKkyBhEJElSZAwikiQpMgYRSZIUGYOIJEmKjEFEkiRFxiAiSZIiYxCRJEmRMYhIkqTIGEQkSVJkDCKSJCky/w/SBrf4nx9lGQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.linspace(0,10,50)\n",
    "\n",
    "y = 0.8 * x -5\n",
    "plt.plot(x,y,color = 'red')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e488e40c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x7fa9f9f047c0>]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAisAAAGdCAYAAADT1TPdAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAA9hAAAPYQGoP6dpAABCZUlEQVR4nO3deVxVdcLH8c9luywCsiiIgqKS+wpqqZNaSVNqNU2LaS5ppaNWZE3q1JT1PEFZY81kWba4ZFbTU5Y1LdIymmMqgru5JSKKiAtyEeQC957nD4qJ1HLhci6X7/v1Oq/X3HMPly93hPPt3PP7/SyGYRiIiIiIuCkvswOIiIiI/BqVFREREXFrKisiIiLi1lRWRERExK2prIiIiIhbU1kRERERt6ayIiIiIm5NZUVERETcmo/ZAS6W0+kkLy+P4OBgLBaL2XFERETkHBiGQXFxMTExMXh5/fq1k3pfVvLy8oiNjTU7hoiIiFyA3NxcWrRo8avH1PuyEhwcDFT9sCEhISanERERkXNhs9mIjY2tPo//mnpfVn766CckJERlRUREpJ45l1s4dIOtiIiIuDWVFREREXFr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r27KkhtbUMOOM2f/58s6N5PA1ddp2PP/7Y6Ny5s2G1Wo327dsb8+bNMzuSx7HZbMZ9991nxMXFGf7+/kbr1q2Nhx9+2LDb7WZHq9e++eabM/5NHjNmjGEYVcOXH3vsMSM6OtqwWq3G5ZdfbmzZsqXO8lkMwzDqphaJiIiInD/dsyIiIiJuTWVFRERE3JrKioiIiLg1lRURERFxayorIiIi4tZUVkRERMStqayIiIiIW1NZEREREbemsiIiIiJuTWVFRERE3JrKioiIiLg1lRURERFxa/8Pm/ez5CebQqsAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = np.linspace(0,10,50)\n",
    "\n",
    "y = x**2 + 4*x - 15\n",
    "\n",
    "plt.plot(x,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "e2fd38a8",
   "metadata": {},
   "source": [
    "### Normal Equation"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a298fbb3",
   "metadata": {},
   "source": [
    "#### System of Linear Equations with Two Variables\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "8ab35171",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1,  1],\n",
       "       [ 2, -1]])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = np.array([[1,1],[2,-1]])\n",
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "4862149b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([14, 10])"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = np.array([14,10])\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "12ebf982",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([8., 6.])"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# linalg 线性代数，slove计算线性回归问题\n",
    "np.linalg.solve(X,y)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "68a8df7d",
   "metadata": {},
   "source": [
    "$f(x,y) = 8x + 6y $"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3fa46c9b",
   "metadata": {},
   "source": [
    "$W = (X^TX)^{-1}X^Ty$ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "8704077b",
   "metadata": {},
   "outputs": [],
   "source": [
    "A = X.T.dot(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "a24d43ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[0.22222222, 0.11111111],\n",
       "       [0.11111111, 0.55555556]])"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 逆矩阵\n",
    "B = np.linalg.inv(A)\n",
    "B"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "0c606efa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.33333333,  0.33333333],\n",
       "       [ 0.66666667, -0.33333333]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "C = B.dot(X.T)\n",
    "C"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "b8bd5231",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([8., 6.])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "C.dot(y)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3a7428ad",
   "metadata": {
    "heading_collapsed": true
   },
   "source": [
    "#### 三元一次方程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "a5ead9e0",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1, -1,  1],\n",
       "       [ 2,  1, -1],\n",
       "       [ 3, -2,  6]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X = np.array([[1,-1,1],[2,1,-1],[3,-2,6]])\n",
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "0746530c",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([100,  80, 256])"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = np.array([100,80,256])\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "40c947cc",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 60., -41.,  -1.])"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "w = np.linalg.inv(X.T.dot(X)).dot(X.T).dot(y)\n",
    "w"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "433a4fb5",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1, -1,  1],\n",
       "       [ 2,  1, -1],\n",
       "       [ 3, -2,  6]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "4fe17447",
   "metadata": {
    "hidden": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1,  2,  3],\n",
       "       [-1,  1, -2],\n",
       "       [ 1, -1,  6]])"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.T"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "003a6ab5",
   "metadata": {},
   "source": [
    "#### 八元一次方程"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "91b0f2d1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  0,  14,   8,   0,   5,  -2,   9,  -3],\n",
       "       [ -4,  10,   6,   4, -14,  -2, -14,   8],\n",
       "       [ -1,  -6,   5, -12,   3,  -3,   2,  -2],\n",
       "       [  5,  -2,   3,  10,   5,  11,   4,  -8],\n",
       "       [-15, -15,  -8, -15,   7,  -4, -12,   2],\n",
       "       [ 11, -10,  -2,   4,   3,  -9,  -6,   7],\n",
       "       [-14,   0,   4,  -3,   5,  10,  13,   7],\n",
       "       [ -3,  -7,  -2,  -8,   0,  -6,  -5,  -9]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([ 339, -114,   30,  126, -395,  -87,  422, -309])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 上面八元一次方程对应的X数据\n",
    "X = np.array([[  0 ,14 , 8 ,  0 ,  5,  -2,   9,  -3],\n",
    " [ -4 , 10 ,  6 ,  4 ,-14 , -2 ,-14  , 8],\n",
    " [ -1 , -6  , 5 ,-12 ,  3 , -3 ,  2 , -2],\n",
    " [  5 , -2  , 3 , 10  , 5 , 11 ,  4  ,-8],\n",
    " [-15 ,-15  ,-8 ,-15 ,  7 , -4, -12 ,  2],\n",
    " [ 11 ,-10 , -2 ,  4  , 3 , -9 , -6 ,  7],\n",
    " [-14 ,  0 ,  4 , -3  , 5 , 10 , 13 ,  7],\n",
    " [ -3 , -7 , -2 , -8  , 0 , -6 , -5 , -9]])\n",
    "# 对应的y\n",
    "y = np.array([ 339 ,-114  , 30 , 126, -395 , -87 , 422, -309])\n",
    "display(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "61f3486a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1.,  5., 15.,  3.,  8.,  4., 17., 12.])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 正规方程\n",
    "w = np.linalg.inv(X.T.dot(X)).dot(X.T).dot(y)\n",
    "w"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "3f4aef61",
   "metadata": {},
   "source": [
    "### sklearn算法使用（正规方程）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "8cb559be",
   "metadata": {},
   "outputs": [],
   "source": [
    "# linear线性，model模型、算法\n",
    "# LinearRegression：线性回归\n",
    "# 站在巨人的肩膀上\n",
    "from sklearn.linear_model import LinearRegression"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "15df12df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  0,  14,   8,   0,   5,  -2,   9,  -3],\n",
       "       [ -4,  10,   6,   4, -14,  -2, -14,   8],\n",
       "       [ -1,  -6,   5, -12,   3,  -3,   2,  -2],\n",
       "       [  5,  -2,   3,  10,   5,  11,   4,  -8],\n",
       "       [-15, -15,  -8, -15,   7,  -4, -12,   2],\n",
       "       [ 11, -10,  -2,   4,   3,  -9,  -6,   7],\n",
       "       [-14,   0,   4,  -3,   5,  10,  13,   7],\n",
       "       [ -3,  -7,  -2,  -8,   0,  -6,  -5,  -9]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([ 339, -114,   30,  126, -395,  -87,  422, -309])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([ 1.,  5., 15.,  3.,  8.,  4., 17., 12.])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# fit_intercept = False 不计算截距！！！\n",
    "model = LinearRegression(fit_intercept = False)#默认去计算截距，上面八元一次方程是没有截距的，计算的时候不要去计算截距，所以False\n",
    "# X 数据；y 目标值\n",
    "# X ---> y 存在一定的关系\n",
    "display(X,y) #八个方程，八个目标值\n",
    "model.fit(X,y)\n",
    "# coef_ 结果，返回值\n",
    "# 系数就是斜率，就是W，方程的解\n",
    "model.coef_\n",
    "\n",
    "#一开始和上面的解，求出来的和上面的不对应\n",
    "#所以在 Linear参数里面 ，fit_intercept有截距的意思，默认去计算截距了。\n",
    "#我们所提供的八元一次方程是没有截距的。我们要告诉去计算的时候不要去计算截距。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "8a2523e0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.0"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 默认计算截距\n",
    "#因为我们在上面设置了Flase，所以就不会求斜率了，所以就是0，\n",
    "#因为我们原方程的斜率是0.\n",
    "\n",
    "model.intercept_"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "980565cf",
   "metadata": {},
   "source": [
    "### 带截距的线性方程"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "aae433f2",
   "metadata": {},
   "source": [
    "#### 增加了截距12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "64aee3dd",
   "metadata": {},
   "outputs": [],
   "source": [
    "# array([ 1.,  5., 15.,  3.,  8.,  4., 17., 12.])"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9f6ec4f7",
   "metadata": {},
   "source": [
    "$ f(X) = x_1 + 5x_2 + 15x_3 + 3x_4 + 8x_5 + 4x_6 + 17x_7 + 12x_8 + 12$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "d84d8d92",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 351, -102,   42,  138, -383,  -75,  434, -297])"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = y + 12\n",
    "y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "6a34d61f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression()"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 指定了fit_intercept = True 没有使用正规方程\n",
    "model = LinearRegression(fit_intercept = True)\n",
    "# fit健身，训练，特指算法、模型训练，拟合\n",
    "# 数据X和y之间存在规律，拟合出来，找到\n",
    "model.fit(X,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "a3980c6a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "26.92820500839804"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b_ = model.intercept_\n",
    "b_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "14f2ff90",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 3.45714358,  6.90856568, 10.8264159 ,  0.44734523,  6.86091921,\n",
       "        6.24871714, 17.47728367, 12.78738885])"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "w_ = model.coef_\n",
    "w_\n",
    "#因为没有像上面使用正规方程，所以和结果有点不同"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "9b807fd4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 351., -102.,   42.,  138., -383.,  -75.,  434., -297.])"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "X.dot(w_) + b_"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c70a2d6e",
   "metadata": {},
   "source": [
    "#### 修改数据X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "87f92350",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[  0,  14,   8,   0,   5,  -2,   9,  -3,   1],\n",
       "       [ -4,  10,   6,   4, -14,  -2, -14,   8,   1],\n",
       "       [ -1,  -6,   5, -12,   3,  -3,   2,  -2,   1],\n",
       "       [  5,  -2,   3,  10,   5,  11,   4,  -8,   1],\n",
       "       [-15, -15,  -8, -15,   7,  -4, -12,   2,   1],\n",
       "       [ 11, -10,  -2,   4,   3,  -9,  -6,   7,   1],\n",
       "       [-14,   0,   4,  -3,   5,  10,  13,   7,   1],\n",
       "       [ -3,  -7,  -2,  -8,   0,  -6,  -5,  -9,   1]])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "array([ 351, -102,   42,  138, -383,  -75,  434, -297])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "X = np.concatenate([X,np.full(shape =(8,1),fill_value=1)],axis=1)\n",
    "display(X,y)\n",
    "#最后一列都变了111，\n",
    "#这一列相当于W0\n",
    "#x增加了一列，y是增加了12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "e33a1082",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-0.28902686,  3.99875919, 17.18947808,  4.3391324 ,  8.59756611,\n",
       "        2.82031444, 16.74961517, 11.58693282,  4.16860692])"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "0.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "model = LinearRegression(fit_intercept=False)\n",
    "model.fit(X,y)\n",
    "display(model.coef_,model.intercept_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "a2ff4d31",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([  8.7578125 ,   6.72265625,  25.25      , -24.66015625,\n",
       "        20.97460938,  50.53125   ,   2.09277344,  17.50976562,\n",
       "       -14.46875   ])"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.linalg.inv(X.T.dot(X)).dot(X.T).dot(y)#正规方程解法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "10e279f7",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9d25101c",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4988eb05",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.13"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
